<template>
    <div class="file_list" :class="{listHide : !listShow, 'tophide' : arrowShow}">
        <div class="file_out_box">
            <div class="file_in_box">
                <ul>
                    <li :class="{good : item.status == 1, bad : item.isBad == 1, sel : item.id == currentId}" 
                    v-for="(item, index) in showList" @click="skipFile(item)" :key="index" :title="item.name">
                        <span>{{index + 1}}. </span>{{item.name}}</li>
                </ul>
            </div>
        </div>
    </div>
</template>

<script>
// import $ from 'jquery'
export default {
    name: "FileList",
    data() {
        return {

        }
    },
    props: {
        listShow : {
            type : Boolean,
            default: false 
        },
        showList : {
            type: Array,
            default: () => ([])
        },
        currentId: {
        },
        arrowShow: {
          default: false
        }
    },
    methods: {
        skipFile(item){
            this.$emit('skipFile', item)
        }
    }
};
</script>

<style lang="less" scoped>
.file_list {
    width: 204px;
    z-index: 5;
    background: #f3f3f3;
    position: absolute;
    top: 100px;
    bottom: 0;
    left: 0;
    flex: 1;
    overflow: hidden;
    float: left;
    transition: all 0.4s linear;
    -webkit-transition: all 0.4s linear;
    ul {
        width: 100%;
        margin-top: 10px;
        li {
            width: 100%;
            padding: 0 20px;
            font-size: 14px;
            line-height: 28px;
            color: #888888;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            cursor: pointer;
        }
        li.good {
            color: #333333;
        }
        li.bad {
            color: #d12235;
        }
        li.sel {
            color: #1aad19;
        }
    }
    .file_in_box {
        width: 204px;
        height: 100%;
        text-align: left;
        border-top: 1px solid #dadbdb;
        border-left: 1px solid #dadbdb;
        padding-bottom: 35px;
        position: absolute;
        right: 0;
        bottom: 0;
        overflow-y: auto;
    }
}
.file_out_box{width: 100%;height: 100%;position: relative;}
.listHide {
    width: 0px;
}
.tophide {
  top: 50px;
}
// .file_list ul maked {
//     color: #303030;
// }
// .file_list ul badcls {
//     color: #e84f49;
// }
</style>
